<style>

</style>
<template>
    <!--<div>啊啊啊</div>-->
</template>
<script>
    Rap.define('','',function () {
        return {
            name:'ly-table-content',
            props: {
                column:{
                },
                row:{},
                index:{}
            },
            data:function () {
                return {
                    'has_split_cell':false
                }
            },
            render:function (createElement) {
                var child=null;
                if(!this.column.contentRender){
                    if(!this.column.name){
                        child=this.index+1+'';
                    }else{
                        child=this.row[this.column.name];
                    }
                }else{
                     if(!this.column.has_child){
                         child=this.column.contentRender.call(this._renderProxy,{column:this.column,row:this.row,index:this.index} );
                     }else{
                        child=this.column.contentRender.call(this._renderProxy,createElement,{column:this.column,row:this.row,index:this.index});
                    }
                }
                //有子栏目且子栏目被隐藏
                if(this.column.has_child&&!this.column.child_count){
                    return '';
                }
                return createElement('div',{ 'class': {
                    'ly-table-content-item':true,
                    'ly-table-content-has-child':this.column.has_child,
                    'cell-item-split': this.has_split_cell
                }},[child]);
            }
        }
    });
</script>
